package top.houry.protobuf;

import com.bj58.jxedt.scf.screen.smartdevice.message.SmartDeviceMessage;

public class ProtoBufTest {
    public static void main(String[] args) {
        SmartDeviceMessage.TwinkleMessage.Builder builder = SmartDeviceMessage.TwinkleMessage.newBuilder();

//        builder.setMsgType("smartDevice.RobotMotionTrailResult");
        builder.setMsgType("T");
        SmartDeviceMessage.RobotMotionTrailResult.Builder track = SmartDeviceMessage.RobotMotionTrailResult.newBuilder();
        track.setDeviceId("25f0ebbb6ab6b241");
        track.setTimestamp(1692586439253L);
//        track.setTrainid(1143124796893036500L);
//        track.setTaskid(1693453145537036300L);
//        track.setCourseKey("CFTC");
//        track.setClientType("");
        track.setJxid("22144");
//        track.setPos(" {\n" +
//                "        \"x\": 129.8847,\n" +
//                "        \"y\": 0,\n" +
//                "        \"z\": -8.030058\n" +
//                "    }");
//        track.setRot("{\n" +
//                "        \"x\": 0,\n" +
//                "        \"y\": 0.345531,\n" +
//                "        \"z\": 0,\n" +
//                "        \"w\": -0.938407362\n" +
//                "    }");
        track.setInfo("840,1.268,-184.9,1");
        track.setSignal("0,0,0,1,841,001,31381,0,0,1,33,34,95,1,00402320082600520719,20,0,840,1.268,-184.9,1");
//        track.setS58();

        builder.setBytesData(track.build().toByteString());

        System.out.println(builder.build().toByteString().size());
    }
}
